#include <iostream>
#include <vector>
#include <initializer_list>

class A
{
public:
    A(std::initializer_list<int> list) {} /*以任意长度初始化对象*/
};
std::vector<int> func()
{
    return {};
}
void log(std::initializer_list<std::string> list)
{
    for (auto it = list.begin(); it != list.end(); it++)
    {
        std::cout << *it << " ";
    }
    std::cout << std::endl;
}
int main()
{
    // std::initializer_list<int> list = {1, 2, 3};

    log({"1.cpp", "line 30", "空指针错误"});
    A a{1, 2, 3, 4, 5};
    return 0;
}